package Data;
import java.sql.DriverManager;


import com.mysql.jdbc.Connection;
import com.mysql.jdbc.PreparedStatement;
import com.mysql.jdbc.Statement;

	public class connexion {
		protected static java.sql.Connection conn;
	  public static void connect() {      
	    try 
	    {
	    	Class.forName("com.mysql.jdbc.Driver");
	    	System.out.println("Driver O.K.");
	 
	    	String url = "jdbc:mysql://localhost:3306/simforest";
	    	String user = "root";
	    	String passwd = "";
	    	
	    	conn = DriverManager.getConnection(url, user, passwd);
	    	
	    	System.out.println("Connexion effective !");
	        
	    } 
	    
	    catch (Exception e) 
	    {
	      e.printStackTrace();
	    }      
	  }
	  public static java.sql.Connection get_con()
	  {
		  System.out.println(conn);
		  return conn;
		  
	  }
	}
	